from django.db import models
from django.contrib.auth.models import User

# Create your models here.


class User_Detail(models.Model):
    user = models.ForeignKey(User)
    homepage = models.CharField(maxlength=200)
    address = models.CharField(maxlength=250)
    city = models.CharField(maxlength=100)
    skype = models.CharField(maxlength=50)
    msn = models.CharField(maxlength=50)
    occupation = models.CharField(maxlength=50)
    class Admin:
        pass
    def __str__(self):
        return self.user.username

    def create_new(self, user, homepage, address, city, skype, msn, occupation):
        self.user = user
        self.homepage = homepage
        self.address = address
        self.city = city
        self.skype = skype
        self.msn = msn
        self.occupation = occupation
